# print('加法',1+2)
# print('减法',3-2)
# print('乘法',1*2)
# print('除法',10/2)
# print('整除',10//3)
# print('取余',10%3)
# print('幂运算',2**4)

# 赋值运算符
x = 10
y = 20
x = x + y
x += y
x -= y
x *= y
print(x)
x /= y
print(x, type(x))
x %= 2
print(x, type(x))

z = 3
y //= z
print(y)

# 支持链式赋值
a = b = c = 100
print(a, b, c)

# 支持系列解包赋值
a, b = 10, 25
print(a, b)
a, b = b, a
print(a, b)

# 比较运算符
if 10 < 20:
    print('true')

print('-' * 40)

# 逻辑运算符
print(True and True)
print(True and False)
print(True or False)

print(2 > 1 and 2 > 3)  # 左边先计算，第一个表达式为false,结果直接为false

print(not True)
print(not 2 > 1)
